package com.probiz.estore.common.model.other.base;

import java.io.Serializable;
import com.probiz.estore.Constants;
import com.probiz.estore.core.model.BaseObject;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;

/**
 * Tag Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 */
public class TagTbl extends BaseObject implements Serializable {

    protected Integer tagId;
	protected String tagName;
	protected Short module;


	/**
	 * Default Empty Constructor for class Tag
	 */
	public TagTbl () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class Tag
	 */
	public TagTbl (
		 Integer in_tagId
        ) {
		this.setTagId(in_tagId);
    }

    

	/**
	 * 主键	 * @return Integer
     * @hibernate.id column="tagId" type="java.lang.Integer" generator-class="native"
	 */
	public Integer getTagId() {
		return this.tagId;
	}
	
	/**
	 * Set the tagId
	 */	
	public void setTagId(Integer aValue) {
		this.tagId = aValue;
	}	

	/**
	 * 	 * @return String
	 * @hibernate.property column="tagName" type="java.lang.String" length="32" not-null="true" unique="false"
	 */
	public String getTagName() {
		return this.tagName;
	}
	
	/**
	 * Set the tagName
	 * @spring.validator type="required"
	 */	
	public void setTagName(String aValue) {
		this.tagName = aValue;
	}	

	/**
	 * 模块
            1=商品
            2=文章
            3=订单
            4=会员
            	 * @return Short
	 * @hibernate.property column="module" type="java.lang.Short" length="5" not-null="true" unique="false"
	 */
	public Short getModule() {
		return this.module;
	}
	
	/**
	 * Set the module
	 * @spring.validator type="required"
	 */	
	public void setModule(Short aValue) {
		this.module = aValue;
	}	

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof TagTbl)) {
			return false;
		}
		TagTbl rhs = (TagTbl) object;
		return new EqualsBuilder()
				.append(this.tagId, rhs.tagId)
				.append(this.tagName, rhs.tagName)
				.append(this.module, rhs.module)
				.isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.tagId) 
				.append(this.tagName) 
				.append(this.module) 
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("tagId", this.tagId) 
				.append("tagName", this.tagName) 
				.append("module", this.module) 
				.toString();
	}

	/**
	 * Return the name of the first key column
	 */
	public String getFirstKeyColumnName() {
		return "tagId";
	}
	
	/**
	 * Return the Id (pk) of the entity, must be Integer
	 */
	public Integer getId() {
		return tagId;
	}

}